<style type="text/css">
    .page_num{width:580px;margin:0 auto;height:25px;line-height:25px;font-size:14px;margin-top:15px;margin-left:15px;}
</style>
<div class="about_pl" style="width:100%;<?php if(1==$layout)echo "";else echo "margin-left:10px;margin-top:10px;";?>">
        <h2><div class="com_tit" style="width:180px;">我要评论<span>COMMENTS</span></div>
             <?php if($sf_user->getAttribute('userId')<1){ ?>
                <!--font style='font-size:12px;float:right;display:block;width:130px;color:#878787;margin-top:-10px;'>请<a style="color:#00AEE3;" href="<?php echo url_for('user/login') ?>">登录</a>ieasy进行评论</font-->
             <?php } ?>
        </h2>
         
        <div class="pl_box">
           <form method="post">
         <input type="text" class="ipt3" id="pl_key" onclick="edf();"  name="pl_key" >&nbsp;<input type="button"  value="发&nbsp;布" id="bt4" name="plsumbit" class="btn4" onclick="conment()">
         </form>
        </div>
         <script type="text/javascript">
             function edf(){
                 var name=document.getElementById('pl_key');
                 name.className="ipt33";
             }
             var p_id=<?php echo $contentId; ?>;
             var u_id="<?php echo $sf_user->getAttribute('userId') ?>";
             var comtext="";
             var type_i=<?php echo $contentTypeId; ?>;
             function conment(){
                 if(null!=u_id&&""!=u_id&&u_id>0)
                 {}else{u_id="1";}
                 comtext=document.getElementById("pl_key").value;
                 document.getElementById('pl_key').className="ipt3";
                 document.getElementById("pl_key").value="";
                 //$.post("321_login.php",{'user_name':u_name, 'password':p_word},onsuccess: function(msg){alert(msg);loginResult(msg);}});
                 $.ajax({type: "POST",url: "<?php echo url_for('user/addcomment') ?>",data: "user_id="+u_id+"&contentId="
                         +p_id+"&comtext="+comtext+"&contentTypeId="+type_i+"&recordCount=<?php echo $recordCount;?>",
                     success: loginResult,
                     error:onfail});
             }
             function onfail(x,e){
                 alert("连接失败");
                 return false;}
             function loginResult(msg){
                 $("#commentlist").html(msg);
             }
         </script>
        <!--############################--> 
        <div id="commentlist">
		<?php
      @include_component('user', 'commentlist',array('contentId'=>$contentId,'currentPage'=>$currentPage,'contentTypeId'=>$contentTypeId,'recordCount'=>$recordCount));
		?>
		</div>

       </div>



     



     

